package router

import (
	"batbat-backend/app/api"
	"batbat-backend/app/service"
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/net/ghttp"
)

// 游戏接口路由
func init() {
	g.Server().Group("/game", func(group *ghttp.RouterGroup) {
		group.Middleware(service.Middleware.Login)

		group.GET("/", api.Game.GetAllGames)
		group.GET("/rank", api.Game.Rank)
		group.GET("/recommend", api.Game.Recommend)
		group.GET("/search", api.Game.Search)
		group.GET("/:id", api.Game.GetGame)
		group.GET("/:id/similar", api.Game.Similar)
	})
}
